package com.hehanpeng.springbootapi.api;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author hehanpeng
 * @date 2018/4/24 21:42
 */
@RestController
public class LogTestApi {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @GetMapping("/log")
    public String log() {
        String name="zhang";
        String email="email@csii.com.cn";
//        logger.trace("trace --- log");
//        logger.debug("debug --- log");
//        logger.info("info --- log");
//        logger.warn("warn --- log");
//        logger.error("error --- log");
        logger.info("---------- name : {},email : {} ---------",name,email);
        return "log";
    }
}
